###########################################################################
# $Id: dbSchema.p 11 2009-04-14 10:21:51Z donbeave $
###########################################################################

@CLASS
dbSchema

@USE
db/models/dbItem.p

@BASE
dbItem

@OPTIONS
locals

#----- Constructor -----

@create[hshOptions]
## hshOptions.name
  ^BASE:create[$hshOptions]

  ^pfAssert:isTrue(def $hshOptions.name && $hshOptions.name is string)[Option "^$.name" is not specified or wrong (CLASS_NAME: $hshOptions.name.CLASS_NAME).]

  $self._name[$hshOptions.name]

#----- Properties -----

@GET_name[]
  $result[$self._name]

@SET_name[strName]
#TODO сделать изменение названия базы данных в БД

@GET_tables[]
  $result[^MANAGER.getTables[$name]]

@GET_tablesCount[]
  $result($tables.count)